{% extends "_layout.html" %}
{% import "component/pagination.njk" as pagination %}
{% import "component/table.njk" as table %}
{% import "component/search.njk" as search %}

{# 样式代码 #}
{% block style %}

{% endblock %}

{# bodyd代码#}
{% block body %}
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">

                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-12">
                            <form class="page-search-form">
                                {{ search.select('审核状态', 'isRecommend', [{
                                id: '1',
                                name: '未审核'
                                },{
                                id: '0',
                                name: '已审核'
                                }], params.isRecommend) }}
                                <div class="col-sm-3">
                                    <div class="input-group">
                                        <span class="input-group-addon">行业分类</span>
                                        <select class="form-control m-b" name="productCategoryId">
                                            <option value="">全部</option>
                                            {% for item in productCategory %}
                                            <option value="{{ item.value }}" {{
                                            'selected' if item.value == params.productCategoryId else ''}}>{{ item.text
                                            }}</option>
                                            {% endfor %}
                                        </select>
                                    </div>
                                </div>
                                {{ search.text('商户姓名', 'name', params.name, true) }}
                            </form>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="table-responsive">
                        <form id="table-form">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th></th>
                                    <th>姓名</th>
                                    <th>用户名</th>
                                    <th>审核状态</th>
                                    <th>手机号</th>
                                    <th>性别</th>
                                    <th>行业分类</th>
                                    <th>员工类型</th>
                                    <th>最后登录时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {% for item in data.list %}
                                <tr>
                                    <td>
                                        <input type="checkbox" value="{{ item.id }}" class="i-checks" name="check">
                                    </td>
                                    <td>{{item.linkName}}</td>
                                    <td>{{item.username}}</td>
                                    <td>
                                        {% if item.status == 1 %}
                                        正常
                                        {% elif item.status == 2 %}
                                        补充资料
                                        {% elif item.status == 3 %}
                                        待审核
                                        {% else %}
                                        审核不通过
                                        {% endif %}
                                    </td>
                                    <td>{{item.mobile}}</td>
                                    <td>
                                        {% if item.sex == 1 %}
                                        男
                                        {% elif item.sex == 0 %}
                                        女
                                        {% else %}
                                        未知
                                        {% endif %}
                                    </td>
                                    <!--行业分类-->
                                    <td>
                                        {% if item.status == 1 %}
                                        正常
                                        {% elif item.status == 2 %}
                                        禁用
                                        {% else %}
                                        未知
                                        {% endif %}
                                    </td>
                                    <td>
                                        {% if item.userType == 1 %}
                                        管理员
                                        {% elif item.userType == 2 %}
                                        员工
                                        {% else %}
                                        未知
                                        {% endif %}
                                    </td>
                                    <td>{{item.lastLoginTime}}</td>
                                    <td data-id="{{ item.id }}">
                                        <a href="/merchant/audit?id={{item.id}}">查看</a>
                                    </td>
                                </tr>
                                {% else %}
                                暂无数据
                                {% endfor %}
                                </tbody>
                            </table>
                        </form>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="btn-region clearfix">
                        <!--<div class="pull-left">-->
                            <!--<button href="" id="batch-del-btn" class="btn btn-danger btn-sm js-batch"-->
                                    <!--data-url="/merchant/delete" data-confirm="确定删除选中的桌台吗?" data-original-title=""-->
                                    <!--title="">-->
                                <!--批量删除-->
                            <!--</button>-->
                        <!--</div>-->
                        <div class="pull-right">
                            {{ pagination.pagination(data, params, '/merchant') }}
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
{% endblock %}

{#js代码#}
{% block js %}
<script>


</script>

{% endblock %}
